﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_Client
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_clientLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_clientKey As Int32
    Private m_clientId As String
    Private m_clientName As String
    Private m_clientContactName As String
    Private m_clientContactTitle As String
    Private m_clientAddress As String
    Private m_clientCity As String
    Private m_clientState As String
    Private m_clientZip As String
    Private m_clientZipP4 As String
    Private m_clientCountry As String
    Private m_clientPhone As String
    Private m_clientFax As String
    Private m_clientComment As String
    Private m_clientLastUpdate As Date
    Private m_clientLastEdit As String

    Private Const constClientKey As Int32 = -1
    Private Const constClientId As String = "ClientId"
    Private Const constClientName As String = "Client"
    Private Const constClientContactName As String = "na"
    Private Const constClientContactTitle As String = "na"
    Private Const constClientAddress As String = "na"
    Private Const constClientCity As String = "na"
    Private Const constClientState As String = "na"
    Private Const constClientZip As String = "na"
    Private Const constClientZipP4 As String = "na"
    Private Const constClientCountry As String = "na"
    Private Const constClientPhone As String = "1-312-555-1212"
    Private Const constClientFax As String = "1-815-555-1212"
    Private Const constClientComment As String = "na"
    Private Const constClientLastUpdate As Date = #1/1/2001#
    Private Const constClientLastEdit As String = "na"



    Public Property clientKey() As Int32
        Get
            Return Me.m_clientKey
        End Get
        Set(ByVal value As Int32)
            Me.m_clientKey = value
            Me.OnPropertyChanged("clientKey")
        End Set
    End Property

    Public Property clientID() As String
        Get
            Return Me.m_clientId
        End Get
        Set(ByVal value As String)
            Me.m_clientId = value
            Me.OnPropertyChanged("clientID")
        End Set
    End Property

    Public Property clientName() As String
        Get
            Return Me.m_clientName
        End Get
        Set(ByVal value As String)
            Me.m_clientName = value
            Me.OnPropertyChanged("clientName")
        End Set
    End Property

    Public Property clientContactName() As String
        Get
            Return Me.m_clientContactName
        End Get
        Set(ByVal value As String)
            Me.m_clientContactName = value
            Me.OnPropertyChanged("clientContactName")
        End Set
    End Property

    Public Property clientContactTitle() As String
        Get
            Return Me.m_clientContactTitle
        End Get
        Set(ByVal value As String)
            Me.m_clientContactTitle = value
            Me.OnPropertyChanged("clientContactTitle")
        End Set
    End Property

    Public Property clientAddress() As String
        Get
            Return Me.m_clientAddress
        End Get
        Set(ByVal value As String)
            Me.m_clientAddress = value
            Me.OnPropertyChanged("clientAddress")
        End Set
    End Property

    Public Property clientCity() As String
        Get
            Return Me.m_clientCity
        End Get
        Set(ByVal value As String)
            Me.m_clientCity = value
            Me.OnPropertyChanged("clientCity")
        End Set
    End Property

    Public Property clientState() As String
        Get
            Return Me.m_clientState
        End Get
        Set(ByVal value As String)
            Me.m_clientState = value
            Me.OnPropertyChanged("clientState")
        End Set
    End Property

    Public Property clientZip() As String
        Get
            Return Me.m_clientZip
        End Get
        Set(ByVal value As String)
            Me.m_clientZip = value
            Me.OnPropertyChanged("clientZip")
        End Set
    End Property

    Public Property clientZipP4() As String
        Get
            Return Me.m_clientZipP4
        End Get
        Set(ByVal value As String)
            Me.m_clientZipP4 = value
            Me.OnPropertyChanged("clientZipP4")
        End Set
    End Property

    Public Property clientCountry() As String
        Get
            Return Me.m_clientCountry
        End Get
        Set(ByVal value As String)
            Me.m_clientCountry = value
            Me.OnPropertyChanged("clientCountry")
        End Set
    End Property

    Public Property clientPhone() As String
        Get
            Return Me.m_clientPhone
        End Get
        Set(ByVal value As String)
            Me.m_clientPhone = value
            Me.OnPropertyChanged("clientPhone")
        End Set
    End Property

    Public Property clientFax() As String
        Get
            Return Me.m_clientFax
        End Get
        Set(ByVal value As String)
            Me.m_clientFax = value
            Me.OnPropertyChanged("clientFax")
        End Set
    End Property

    Public Property clientComment() As String
        Get
            Return Me.m_clientComment
        End Get
        Set(ByVal value As String)
            Me.m_clientComment = value
            Me.OnPropertyChanged("clientComment")
        End Set
    End Property

    Public Property clientLastUpdate() As Date
        Get
            Return Me.m_clientLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_clientLastUpdate = value
            Me.OnPropertyChanged("clientLastUpdate")
        End Set
    End Property

    Public Property clientLastEdit() As String
        Get
            Return Me.m_clientLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_clientLastEdit = value
            Me.OnPropertyChanged("clientLastEdit")
        End Set
    End Property


#End Region


#Region " Methods "

    Public Sub initProperties()

        Try


            clientKey = constClientKey
            clientID = constClientId
            clientName = constClientName
            clientContactName = constClientContactName
            clientContactTitle = constClientContactTitle
            clientAddress = constClientAddress
            clientCity = constClientCity
            clientState = constClientState
            clientZip = constClientZip
            clientZipP4 = constClientZipP4
            clientCountry = constClientCountry
            clientPhone = constClientPhone
            clientFax = constClientFax
            clientComment = constClientComment
            clientLastUpdate = Now
            clientLastEdit = constClientLastEdit

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub

#End Region



End Class


